package name.hankc.spring;

import java.util.stream.Stream;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext;

public class XMLAnnotationApplication {

  public static void main(String[] args) throws Exception {
    ApplicationContext ctx = new ClassPathXmlApplicationContext("basic_dl/xml-annotation.xml");

    String[] beanNames = ctx.getBeanDefinitionNames();
    // 利用jdk8的Stream快速编写打印方法
    Stream.of(beanNames).forEach(System.out::println);
  }
}